-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
front: fix selected track display #10394
base: dev
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## dev #10394 +/- ##
==========================================
- Coverage 81.80% 81.77% -0.04%
==========================================
Files 1073 1055 -18
Lines 106605 105925 -680
Branches 731 730 -1
==========================================
- Hits 87213 86616 -597
+ Misses 19353 19270 -83
Partials 39 39
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
6ebdd08
to
91c86cb
Compare
91c86cb
to
aa9a0a2
Compare
Nice fix ! It also closes #10299, there were duplicates :) |
pathSteps | ||
.map((pathStep, index): MarkerProperties | null => { | ||
const matchingOp = suggestedOP.find((op) => | ||
matchPathStepAndOp(pathStep as PathItemLocation, op) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, this is dangerous… What is the reason why we can't replace or update MarkerInformation
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just removed the cast
simulationPathSteps={markersInfo} | ||
/> | ||
{infraId && ( | ||
<ScenarioContextProvider infraId={infraId}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the new code require a scenario context? It seems a bit weird to use something specific to operational studies in STDCM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you suggested, I use useCachedTrackSections
instead
front/src/applications/stdcm/components/StdcmForm/StdcmConfig.tsx
Outdated
Show resolved
Hide resolved
...les/trainschedule/components/ManageTrainSchedule/ManageTrainScheduleMap/ItineraryMarkers.tsx
Show resolved
Hide resolved
...les/trainschedule/components/ManageTrainSchedule/ManageTrainScheduleMap/ItineraryMarkers.tsx
Outdated
Show resolved
Hide resolved
...les/trainschedule/components/ManageTrainSchedule/ManageTrainScheduleMap/ItineraryMarkers.tsx
Show resolved
Hide resolved
...les/trainschedule/components/ManageTrainSchedule/ManageTrainScheduleMap/ItineraryMarkers.tsx
Outdated
Show resolved
Hide resolved
...les/trainschedule/components/ManageTrainSchedule/ManageTrainScheduleMap/ItineraryMarkers.tsx
Show resolved
Hide resolved
d408ed1
to
b9316ab
Compare
a5318cc
to
27b9449
Compare
front/src/applications/stdcm/components/StdcmForm/StdcmConfig.tsx
Outdated
Show resolved
Hide resolved
...les/trainschedule/components/ManageTrainSchedule/ManageTrainScheduleMap/ItineraryMarkers.tsx
Outdated
Show resolved
Hide resolved
731425f
to
b7e6857
Compare
@@ -47,7 +47,9 @@ type MarkerProperties = { | |||
type ItineraryMarkersProps = { | |||
map: Map; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that we don't use map
anymore. There are also some unused imports.
map: Map; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
const markersInformation = useMemo( | ||
() => extractMarkerInformation(simulationPathSteps, showStdcmAssets), | ||
() => | ||
pathStepsAndSuggestedOPs && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is one issue. As we don't pass this prop in stdcm, markersInformation
isn't defined and there is one no marker in the stdcm maps.
31d8a6e
to
e4fedab
Compare
Signed-off-by: theocrsb <[email protected]>
e4fedab
to
ed9bb7e
Compare
fix #10372
fix #10414